﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Share;

namespace WebApplicationNet4
{
    public static class ProductService
    {
        public static ServiceResponse<Product> GetList()
        {
            List<Product> products = new List<Product>();
            foreach (var i in Enumerable.Range(1, 10))
            {
                products.Add(new Product
                {
                    Name = "张三" + i.ToString(),
                    ExpiryDate = DateTime.Today.AddDays(i),
                    Price = 1 + i,
                    Sizes = new string[] { "A", "b" }
                });
            }
            return new ServiceResponse<Product>
            {
                Total = 10,
                TotalPages = 1,
                Data = products
            };
        }
    }
}